using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
using ComponentFactory.Krypton.Toolkit;
using DukeyCssFetch.api;
using DukeyCssFetch.UI;

namespace DukeyCssFetch
{
	// Token: 0x02000008 RID: 8
	public class DownOption : Form
	{
		// Token: 0x06000032 RID: 50 RVA: 0x00005EA4 File Offset: 0x000040A4
		public DownOption()
		{
			
			this.InitializeComponent();
		}

		// Token: 0x06000035 RID: 53 RVA: 0x000060BC File Offset: 0x000042BC
		private void btnBrowser_Click(object sender, EventArgs e)
		{
			BrowserFrm browserFrm = new BrowserFrm();
			if (browserFrm.ShowDialog() == DialogResult.OK)
			{
				this.txtContainerHtml.Text = Comm.ContainerHtml;
			}
		}

		// Token: 0x06000036 RID: 54 RVA: 0x000060E8 File Offset: 0x000042E8
		protected override void Dispose(bool disposing)
		{
			if (disposing && this.icontainer_0 != null)
			{
				this.icontainer_0.Dispose();
			}
			base.Dispose(disposing);
		}

		// Token: 0x06000034 RID: 52 RVA: 0x000060A8 File Offset: 0x000042A8
		private void DownOption_Load(object sender, EventArgs e)
		{
			this.txtContainerHtml.Text = Comm.ContainerHtml;
		}

		// Token: 0x06000033 RID: 51 RVA: 0x00005EB8 File Offset: 0x000040B8
		private void GbAmWkiTpK_Click(object sender, EventArgs e)
		{
			if (!string.IsNullOrEmpty(this.txtBasefolder.Text.Trim()))
			{
				AllConfig.htmlbg_folder = string.Concat(new string[]
				{
					this.txtBasefolder.Text.Trim(),
					"/",
					this.txtImagefolder.Text.Trim(),
					"/",
					this.figmdikZxS.Text.Trim(),
					"/"
				});
				AllConfig.cssbg_folder = string.Concat(new string[]
				{
					this.txtBasefolder.Text.Trim(),
					"/",
					this.txtCssFolder.Text.Trim(),
					"/",
					this.txtCssbgfolder.Text.Trim(),
					"/"
				});
				AllConfig.css_folder = this.txtBasefolder.Text.Trim() + "/" + this.txtCssFolder.Text.Trim() + "/";
				AllConfig.images_folder = this.txtBasefolder.Text.Trim() + "/" + this.txtImagefolder.Text.Trim() + "/";
				AllConfig.js_folder = this.txtBasefolder.Text.Trim() + "/" + this.txtJsfolder.Text.Trim() + "/";
				AllConfig.swf_folder = this.txtBasefolder.Text.Trim() + "/" + this.txtSwffolder.Text.Trim() + "/";
			}
			if (!string.IsNullOrEmpty(this.txtContainerHtml.Text.Trim()))
			{
				Comm.ContainerHtml = this.txtContainerHtml.Text.Trim();
			}
			base.DialogResult = DialogResult.OK;
		}

		// Token: 0x06000037 RID: 55 RVA: 0x00006108 File Offset: 0x00004308
		private void InitializeComponent()
		{
			this.groupBox1 = new GroupBox();
			this.label9 = new Label();
			this.txtContainerHtml = new KryptonTextBox();
			this.GbAmWkiTpK = new KryptonButton();
			this.btnCancel = new KryptonButton();
			this.groupBox2 = new GroupBox();
			this.label8 = new Label();
			this.figmdikZxS = new KryptonTextBox();
			this.label7 = new Label();
			this.txtCssbgfolder = new KryptonTextBox();
			this.label3 = new Label();
			this.txtSwffolder = new KryptonTextBox();
			this.label6 = new Label();
			this.txtImagefolder = new KryptonTextBox();
			this.label5 = new Label();
			this.txtJsfolder = new KryptonTextBox();
			this.label4 = new Label();
			this.txtCssFolder = new KryptonTextBox();
			this.label2 = new Label();
			this.txtBasefolder = new KryptonTextBox();
			this.label1 = new Label();
			this.btnBrowser = new KryptonButton();
			this.groupBox1.SuspendLayout();
			this.groupBox2.SuspendLayout();
			base.SuspendLayout();
			this.groupBox1.Controls.Add(this.label9);
			this.groupBox1.Controls.Add(this.txtContainerHtml);
			this.groupBox1.Location = new Point(12, 121);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new Size(621, 117);
			this.groupBox1.TabIndex = 0;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "页面HTML源码";
			this.label9.AutoSize = true;
			this.label9.ForeColor = SystemColors.ControlDark;
			this.label9.Location = new Point(102, 0);
			this.label9.Name = "label9";
			this.label9.Size = new Size(275, 12);
			this.label9.TabIndex = 2;
			this.label9.Text = "如果下载不正确,你可以在下方修改html源码后下载";
			this.txtContainerHtml.Location = new Point(6, 21);
			this.txtContainerHtml.MaxLength = 927670000;
			this.txtContainerHtml.Multiline = true;
			this.txtContainerHtml.Name = "txtContainerHtml";
			this.txtContainerHtml.ScrollBars = ScrollBars.Both;
			this.txtContainerHtml.Size = new Size(609, 78);
			this.txtContainerHtml.TabIndex = 0;
			this.GbAmWkiTpK.Location = new Point(391, 251);
			this.GbAmWkiTpK.Name = "btnOK";
			this.GbAmWkiTpK.TabIndex = 1;
			this.GbAmWkiTpK.Values.Text = "确 定";
			this.GbAmWkiTpK.Click += new EventHandler(this.GbAmWkiTpK_Click);
			this.btnCancel.DialogResult = DialogResult.Cancel;
			this.btnCancel.Location = new Point(509, 251);
			this.btnCancel.Name = "btnCancel";
			this.btnCancel.TabIndex = 2;
			this.btnCancel.Values.Text = "关 闭";
			this.groupBox2.Controls.Add(this.label8);
			this.groupBox2.Controls.Add(this.figmdikZxS);
			this.groupBox2.Controls.Add(this.label7);
			this.groupBox2.Controls.Add(this.txtCssbgfolder);
			this.groupBox2.Controls.Add(this.label3);
			this.groupBox2.Controls.Add(this.txtSwffolder);
			this.groupBox2.Controls.Add(this.label6);
			this.groupBox2.Controls.Add(this.txtImagefolder);
			this.groupBox2.Controls.Add(this.label5);
			this.groupBox2.Controls.Add(this.txtJsfolder);
			this.groupBox2.Controls.Add(this.label4);
			this.groupBox2.Controls.Add(this.txtCssFolder);
			this.groupBox2.Controls.Add(this.label2);
			this.groupBox2.Controls.Add(this.txtBasefolder);
			this.groupBox2.Controls.Add(this.label1);
			this.groupBox2.Location = new Point(12, 12);
			this.groupBox2.Name = "groupBox2";
			this.groupBox2.Size = new Size(621, 100);
			this.groupBox2.TabIndex = 3;
			this.groupBox2.TabStop = false;
			this.groupBox2.Text = "输出目录";
			this.label8.AutoSize = true;
			this.label8.ForeColor = SystemColors.ControlDark;
			this.label8.Location = new Point(200, 27);
			this.label8.Name = "label8";
			this.label8.Size = new Size(215, 12);
			this.label8.TabIndex = 2;
			this.label8.Text = "提示:请填写单个英文字词,不要包含\"/\"";
			this.figmdikZxS.Location = new Point(471, 45);
			this.figmdikZxS.Name = "txtHtmlbgfolder";
			this.figmdikZxS.Size = new Size(96, 20);
			this.figmdikZxS.TabIndex = 1;
			this.figmdikZxS.Text = "img";
			this.label7.AutoSize = true;
			this.label7.Location = new Point(386, 53);
			this.label7.Name = "label7";
			this.label7.Size = new Size(83, 12);
			this.label7.TabIndex = 0;
			this.label7.Text = "网页背景图片:";
			this.txtCssbgfolder.Location = new Point(277, 47);
			this.txtCssbgfolder.Name = "txtCssbgfolder";
			this.txtCssbgfolder.Size = new Size(96, 20);
			this.txtCssbgfolder.TabIndex = 1;
			this.txtCssbgfolder.Text = "img";
			this.label3.AutoSize = true;
			this.label3.Location = new Point(200, 53);
			this.label3.Name = "label3";
			this.label3.Size = new Size(77, 12);
			this.label3.TabIndex = 0;
			this.label3.Text = "css背景图片:";
			this.txtSwffolder.Location = new Point(471, 74);
			this.txtSwffolder.Name = "txtSwffolder";
			this.txtSwffolder.Size = new Size(96, 20);
			this.txtSwffolder.TabIndex = 1;
			this.txtSwffolder.Text = "swf";
			this.label6.AutoSize = true;
			this.label6.Location = new Point(416, 79);
			this.label6.Name = "label6";
			this.label6.Size = new Size(53, 12);
			this.label6.TabIndex = 0;
			this.label6.Text = "swf目录:";
			this.txtImagefolder.Location = new Point(277, 74);
			this.txtImagefolder.Name = "txtImagefolder";
			this.txtImagefolder.Size = new Size(96, 20);
			this.txtImagefolder.TabIndex = 1;
			this.txtImagefolder.Text = "images";
			this.label5.AutoSize = true;
			this.label5.Location = new Point(194, 79);
			this.label5.Name = "label5";
			this.label5.Size = new Size(83, 12);
			this.label5.TabIndex = 0;
			this.label5.Text = "网页图片目录:";
			this.txtJsfolder.Location = new Point(81, 73);
			this.txtJsfolder.Name = "txtJsfolder";
			this.txtJsfolder.Size = new Size(96, 20);
			this.txtJsfolder.TabIndex = 1;
			this.txtJsfolder.Text = "js";
			this.label4.AutoSize = true;
			this.label4.Location = new Point(17, 79);
			this.label4.Name = "label4";
			this.label4.Size = new Size(47, 12);
			this.label4.TabIndex = 0;
			this.label4.Text = "Js目录:";
			this.txtCssFolder.Location = new Point(81, 47);
			this.txtCssFolder.Name = "txtCssFolder";
			this.txtCssFolder.Size = new Size(96, 20);
			this.txtCssFolder.TabIndex = 1;
			this.txtCssFolder.Text = "css";
			this.label2.AutoSize = true;
			this.label2.Location = new Point(17, 53);
			this.label2.Name = "label2";
			this.label2.Size = new Size(53, 12);
			this.label2.TabIndex = 0;
			this.label2.Text = "css目录:";
			this.txtBasefolder.Location = new Point(81, 21);
			this.txtBasefolder.Name = "txtBasefolder";
			this.txtBasefolder.Size = new Size(96, 20);
			this.txtBasefolder.TabIndex = 1;
			this.txtBasefolder.Text = "style";
			this.label1.AutoSize = true;
			this.label1.Location = new Point(17, 27);
			this.label1.Name = "label1";
			this.label1.Size = new Size(59, 12);
			this.label1.TabIndex = 0;
			this.label1.Text = "素材目录:";
			this.btnBrowser.AutoSize = true;
			this.btnBrowser.Location = new Point(18, 251);
			this.btnBrowser.Name = "btnBrowser";
			this.btnBrowser.Size = new Size(127, 25);
			this.btnBrowser.TabIndex = 1;
			this.btnBrowser.Values.Text = "显示/隐藏内置浏览器";
			this.btnBrowser.Click += new EventHandler(this.btnBrowser_Click);
			base.AcceptButton = this.GbAmWkiTpK;
			base.AutoScaleDimensions = new SizeF(6f, 12f);
			base.AutoScaleMode = AutoScaleMode.Font;
			base.CancelButton = this.btnCancel;
			base.ClientSize = new Size(657, 287);
			base.Controls.Add(this.groupBox2);
			base.Controls.Add(this.btnCancel);
			base.Controls.Add(this.btnBrowser);
			base.Controls.Add(this.GbAmWkiTpK);
			base.Controls.Add(this.groupBox1);
			base.FormBorderStyle = FormBorderStyle.FixedToolWindow;
			base.Name = "DownOption";
			base.ShowIcon = false;
			base.ShowInTaskbar = false;
			base.StartPosition = FormStartPosition.CenterScreen;
			this.Text = "下载选项";
			base.Load += new EventHandler(this.DownOption_Load);
			this.groupBox1.ResumeLayout(false);
			this.groupBox1.PerformLayout();
			this.groupBox2.ResumeLayout(false);
			this.groupBox2.PerformLayout();
			base.ResumeLayout(false);
			base.PerformLayout();
		}

		// Token: 0x04000064 RID: 100
		private KryptonButton btnBrowser;

		// Token: 0x04000053 RID: 83
		private KryptonButton btnCancel;

		// Token: 0x0400005F RID: 95
		private KryptonTextBox figmdikZxS;

		// Token: 0x04000052 RID: 82
		private KryptonButton GbAmWkiTpK;

		// Token: 0x04000050 RID: 80
		private GroupBox groupBox1;

		// Token: 0x04000054 RID: 84
		private GroupBox groupBox2;

		// Token: 0x0400004F RID: 79
		private IContainer icontainer_0;

		// Token: 0x04000056 RID: 86
		private Label label1;

		// Token: 0x04000058 RID: 88
		private Label label2;

		// Token: 0x0400005A RID: 90
		private Label label3;

		// Token: 0x0400005E RID: 94
		private Label label4;

		// Token: 0x0400005C RID: 92
		private Label label5;

		// Token: 0x04000062 RID: 98
		private Label label6;

		// Token: 0x04000060 RID: 96
		private Label label7;

		// Token: 0x04000063 RID: 99
		private Label label8;

		// Token: 0x04000065 RID: 101
		private Label label9;

		// Token: 0x04000055 RID: 85
		private KryptonTextBox txtBasefolder;

		// Token: 0x04000051 RID: 81
		private KryptonTextBox txtContainerHtml;

		// Token: 0x04000059 RID: 89
		private KryptonTextBox txtCssbgfolder;

		// Token: 0x04000057 RID: 87
		private KryptonTextBox txtCssFolder;

		// Token: 0x0400005B RID: 91
		private KryptonTextBox txtImagefolder;

		// Token: 0x0400005D RID: 93
		private KryptonTextBox txtJsfolder;

		// Token: 0x04000061 RID: 97
		private KryptonTextBox txtSwffolder;
	}
}
